package com.webank.wedatasphere.qualitis.project.entity;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;

import javax.persistence.*;
import java.io.Serializable;
/**
 * @author 菜单表
 */
@Entity
@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = "@id")
@Table(name = "data_source_tab")
public class DataSourcePoJo implements Serializable {

    private static final long serialVersionUID = -429065239198706646L;


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(length = 170,name = "jdbc_url")
    private String jdbcUrl;
    @Column(length = 128,name = "username")
    private String username;

    @Column(length = 128,name = "password")
    private String password;

    @Column(length = 128,name = "data_source_name")
    private String dataSourceName;

    @Column(length = 128,name = "connection_status")
    private String connectionStatus;

    @Column(length = 128,name = "owner")
    private String owner;

    @Column(length = 128,name = "creator")
    private String creator;


    @Column(name = "create_time")
    private String createTime;

    @Column(name = "update_time")
    private String updateTime;

    @Column(name = "notes")
    private String notes;

    @Column(name = "data_source_type",length = 128)
    private String dataSourceType;

    @Column(name = "driver_class_name", length = 128)
    private String driverClassName;

    @Transient
    private String pwd;

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Override
    public String toString() {
        return "DataSourcePoJo{" +
                "id=" + id +
                ", jdbcUrl='" + jdbcUrl + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", dataSourceName='" + dataSourceName + '\'' +
                ", connectionStatus='" + connectionStatus + '\'' +
                ", owner='" + owner + '\'' +
                ", creator='" + creator + '\'' +
                ", createTime='" + createTime + '\'' +
                ", updateTime='" + updateTime + '\'' +
                ", notes='" + notes + '\'' +
                ", dataSourceType='" + dataSourceType + '\'' +
                ", driverClassName='" + driverClassName + '\'' +
                '}';
    }

    public DataSourcePoJo() {
    }

    public DataSourcePoJo(Long id, String jdbcUrl, String username, String password, String dataSourceName, String connectionStatus, String owner, String creator, String createTime, String updateTime, String notes, String dataSourceType, String driverClassName) {
        this.id = id;
        this.jdbcUrl = jdbcUrl;
        this.username = username;
        this.password = password;
        this.dataSourceName = dataSourceName;
        this.connectionStatus = connectionStatus;
        this.owner = owner;
        this.creator = creator;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.notes = notes;
        this.dataSourceType = dataSourceType;
        this.driverClassName = driverClassName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getJdbcUrl() {
        return jdbcUrl;
    }

    public void setJdbcUrl(String jdbcUrl) {
        this.jdbcUrl = jdbcUrl;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDataSourceName() {
        return dataSourceName;
    }

    public void setDataSourceName(String dataSourceName) {
        this.dataSourceName = dataSourceName;
    }

    public String getConnectionStatus() {
        return connectionStatus;
    }

    public void setConnectionStatus(String connectionStatus) {
        this.connectionStatus = connectionStatus;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public String getDataSourceType() {
        return dataSourceType;
    }

    public void setDataSourceType(String dataSourceType) {
        this.dataSourceType = dataSourceType;
    }

    public String getDriverClassName() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName = driverClassName;
    }
}
